xenconsoled: improve robustness of logfile handling
authorKeir Fraser <keir@xensource.com>
Wed, 27 Jun 2007 20:05:54 +0000 (21:05 +0100)
committerKeir Fraser <keir@xensource.com>
Wed, 27 Jun 2007 20:05:54 +0000 (21:05 +0100)
commit3f96f21796c6ab5ffec50b70e0457d973eb5d9c2
tree2374dc92ec6fbf4eb2a94ceaa780eec9f4b47906
parent3bc33badf2f2afcb61dca3ee5446e4c13f0c26b4
xenconsoled: improve robustness of logfile handling

Check the 'log_reload' on every iteration of the select() loop, not just when
select() returns EINTR. This is because the log reload signal may have
iterrupted a syscall other than select & thus without this change  we
might miss the reload signal.  The second change makes us process the
hypervisor logs on every iteration of the loop, not just upon timeouts.
This is because if a guest VM were consistently sending some log message
and < 1 second period, the select() would never hit the 1 second timeout
and thus never process the HV logs.

Thanks to Markus Armbruster for pointing out both these edge cases

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tools/console/daemon/io.c